import http from '@/api/request';

// 商学院分类
export const getCollegeCategory = () => {
  return http.request({
    method: 'GET',
    url: '/app/college/category_list',
    params: { status: 1 },
  });
};

// 商学院内容
export const getCollege = (page: number, limit: number, categoryId: number) => {
  return http.request({
    method: 'GET',
    url: '/app/college/list',
    params: { page_size: limit, page: page, college_category_id: categoryId },
  });
};

// 商学院详情
export const getCollegeDetail = (id: number) => {
  return http.request({
    method: 'GET',
    url: '/app/college/detail',
    params: { id: id },
  });
};

// 商学院设置观看人数
export const setCollegeWatch = (id: number) => {
  return http.request({
    method: 'POST',
    url: '/app/college/set_watch',
    data: { id: id },
  });
};

// 商学院验证密码
export const checkCollegePassword = (id: number, password: string) => {
  return http.request({
    method: 'POST',
    url: '/app/college/check_password',
    data: { id: id, password: password },
  });
};
